package com.Lyoto.NetNotify.Handler;

import com.Lyoto.NetNotify.Schedule.JdkTimerTask;
import com.Lyoto.NetNotify.Schedule.TimerSchedule;

import java.util.Timer;

/**
 * @author Lyoto
 * @Description
 * @Date 2022-09-19 15:01
 * @Version
 **/
public interface NetHandler {
    /**
     * 自旋
     */
    default void spin(){
        spin(new JdkTimerTask());
    };

    void spin(TimerSchedule<Timer> timerSchedule);

    /**
     * 处理
     */
    void doHandler();

    void exec();
    
}
